package io.renren.modules.customer.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.customer.bean.CustomerExportBean;
import io.renren.modules.customer.entity.CustomerEntity;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author Sean
 * @email seanla@qq.com
 * @date 2020-03-17 15:55:41
 */
public interface CustomerService extends IService<CustomerEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 批量上传客户资料
     * @param beans 导入的资料
     * @param currentUserId 当前用户id
     */
    List<CustomerEntity> batchUploadCustomerInformation(List<CustomerExportBean> beans, Long currentUserId);

    /**
     * 获得已经存在的用户电话号码
     * @param mobilePhone 电话号码
     * @return
     */
    List<String> getExistedUserMobilePhones(List<String> mobilePhone);

    /**
     * 根据id查找用户
     * @param ids
     * @return
     */
    List<CustomerEntity> getCustomersByIds(Long[] ids);

    /**
     * 根据手机号码查找用户信息
     * @param phones
     * @return
     */
    List<CustomerEntity> getCustomersByMobilePhones(List<String> phones);
}

